package com.shenmazong.servereduuser.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 职员表（周海军）
 * @TableName tb_staff
 */
@TableName(value ="tb_staff")
@Data
public class TbStaff implements Serializable {
    /**
     * 职员id
     */
    @TableId
    private Long staffId;

    /**
     * 所属学院
     */
    private Long collageId;

    /**
     * 职员编号
     */
    private Long staffNo;

    /**
     * 职员账号
     */
    private String staffName;

    /**
     * 登录密码
     */
    private String staffPass;

    /**
     * 密码盐
     */
    private String staffSalt;

    /**
     * 职员姓名
     */
    private String realName;

    /**
     * 职员年龄
     */
    private Integer staffAge;

    /**
     * 职员照片
     */
    private String staffImg;

    /**
     * 职员联系电话
     */
    private String staffTel;

    /**
     * 职员身份证号
     */
    private String staffIdcard;

    /**
     * 职员性别（0 为女，1为男）
     */
    private Integer staffSex;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 软删除
     */
    @TableLogic
    private Integer deleteFlag;

    /**
     * 职员级别
     */
    private Integer staffLevel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbStaff other = (TbStaff) that;
        return (this.getStaffId() == null ? other.getStaffId() == null : this.getStaffId().equals(other.getStaffId()))
            && (this.getCollageId() == null ? other.getCollageId() == null : this.getCollageId().equals(other.getCollageId()))
            && (this.getStaffNo() == null ? other.getStaffNo() == null : this.getStaffNo().equals(other.getStaffNo()))
            && (this.getStaffName() == null ? other.getStaffName() == null : this.getStaffName().equals(other.getStaffName()))
            && (this.getStaffPass() == null ? other.getStaffPass() == null : this.getStaffPass().equals(other.getStaffPass()))
            && (this.getStaffSalt() == null ? other.getStaffSalt() == null : this.getStaffSalt().equals(other.getStaffSalt()))
            && (this.getRealName() == null ? other.getRealName() == null : this.getRealName().equals(other.getRealName()))
            && (this.getStaffAge() == null ? other.getStaffAge() == null : this.getStaffAge().equals(other.getStaffAge()))
            && (this.getStaffImg() == null ? other.getStaffImg() == null : this.getStaffImg().equals(other.getStaffImg()))
            && (this.getStaffTel() == null ? other.getStaffTel() == null : this.getStaffTel().equals(other.getStaffTel()))
            && (this.getStaffIdcard() == null ? other.getStaffIdcard() == null : this.getStaffIdcard().equals(other.getStaffIdcard()))
            && (this.getStaffSex() == null ? other.getStaffSex() == null : this.getStaffSex().equals(other.getStaffSex()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag()))
            && (this.getStaffLevel() == null ? other.getStaffLevel() == null : this.getStaffLevel().equals(other.getStaffLevel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStaffId() == null) ? 0 : getStaffId().hashCode());
        result = prime * result + ((getCollageId() == null) ? 0 : getCollageId().hashCode());
        result = prime * result + ((getStaffNo() == null) ? 0 : getStaffNo().hashCode());
        result = prime * result + ((getStaffName() == null) ? 0 : getStaffName().hashCode());
        result = prime * result + ((getStaffPass() == null) ? 0 : getStaffPass().hashCode());
        result = prime * result + ((getStaffSalt() == null) ? 0 : getStaffSalt().hashCode());
        result = prime * result + ((getRealName() == null) ? 0 : getRealName().hashCode());
        result = prime * result + ((getStaffAge() == null) ? 0 : getStaffAge().hashCode());
        result = prime * result + ((getStaffImg() == null) ? 0 : getStaffImg().hashCode());
        result = prime * result + ((getStaffTel() == null) ? 0 : getStaffTel().hashCode());
        result = prime * result + ((getStaffIdcard() == null) ? 0 : getStaffIdcard().hashCode());
        result = prime * result + ((getStaffSex() == null) ? 0 : getStaffSex().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode());
        result = prime * result + ((getStaffLevel() == null) ? 0 : getStaffLevel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", staffId=").append(staffId);
        sb.append(", collageId=").append(collageId);
        sb.append(", staffNo=").append(staffNo);
        sb.append(", staffName=").append(staffName);
        sb.append(", staffPass=").append(staffPass);
        sb.append(", staffSalt=").append(staffSalt);
        sb.append(", realName=").append(realName);
        sb.append(", staffAge=").append(staffAge);
        sb.append(", staffImg=").append(staffImg);
        sb.append(", staffTel=").append(staffTel);
        sb.append(", staffIdcard=").append(staffIdcard);
        sb.append(", staffSex=").append(staffSex);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append(", staffLevel=").append(staffLevel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}